package com.piece.admin.context.socket;

import lombok.Data;

/**
 * WebSocket事件
 */
@Data
public class WebSocketEvent<T> {

    private String eventType;

    private String timestamp;

    private T message;

    public WebSocketEvent(String eventType, T message) {
        this.eventType = eventType;
        this.message = message;
    }

    public WebSocketEvent(String eventType, String timestamp, T message) {
        this.eventType = eventType;
        this.timestamp = timestamp;
        this.message = message;
    }
}
